//
//  ClassificationViewController.m
//  HaoHaiSpell
//
//  Created by 郭健 on 16/6/23.
//  Copyright © 2016年 海城. All rights reserved.
//

#import "ClassificationViewController.h"
#import "DCNavTabBarController.h"
#import "ShopController.h"
#import "SentimentViewController.h"
#import "SalesViewController.h"
#import "PriceViewController.h"


#define DCScreenW    [UIScreen mainScreen].bounds.size.width
#define DCScreenH    [UIScreen mainScreen].bounds.size.height
@interface ClassificationViewController ()

@end

@implementation ClassificationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    ShopController *shopVC = [[ShopController alloc]init];
    shopVC.title = @"综合";
    
    SentimentViewController *sentimentVC = [[SentimentViewController alloc]init];
    sentimentVC.title = @"人气";
    
    SalesViewController *salesVC = [[SalesViewController alloc]init];
    salesVC.title = @"销量";
    
    PriceViewController *priceVC = [[PriceViewController alloc]init];
    priceVC.title = @"价格";
    
    NSArray *subViewControllers = @[shopVC,sentimentVC,salesVC,priceVC];
    DCNavTabBarController *tabBarVC = [[DCNavTabBarController alloc]initWithSubViewControllers:subViewControllers];
    tabBarVC.view.frame = CGRectMake(0, 64, DCScreenW, DCScreenH - 64);
    
    [self.view addSubview:tabBarVC.view];
    [self addChildViewController:tabBarVC];

    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
